package com.ruoyi.kiku.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.kiku.mapper.KikuRelationshipMapper;
import com.ruoyi.kiku.domain.KikuRelationship;
import com.ruoyi.kiku.service.IKikuRelationshipService;

/**
 * 关系中心Service业务层处理
 * 
 * @author TT
 * @date 2025-04-02
 */
@Service
public class KikuRelationshipServiceImpl implements IKikuRelationshipService 
{
    @Autowired
    private KikuRelationshipMapper kikuRelationshipMapper;

    /**
     * 查询关系中心
     * 
     * @param id 关系中心主键
     * @return 关系中心
     */
    @Override
    public KikuRelationship selectKikuRelationshipById(Long id)
    {
        return kikuRelationshipMapper.selectKikuRelationshipById(id);
    }

    /**
     * 查询关系中心列表
     * 
     * @param kikuRelationship 关系中心
     * @return 关系中心
     */
    @Override
    public List<KikuRelationship> selectKikuRelationshipList(KikuRelationship kikuRelationship)
    {
        return kikuRelationshipMapper.selectKikuRelationshipList(kikuRelationship);
    }

    /**
     * 新增关系中心
     * 
     * @param kikuRelationship 关系中心
     * @return 结果
     */
    @Override
    public int insertKikuRelationship(KikuRelationship kikuRelationship)
    {
        kikuRelationship.setCreateTime(DateUtils.getNowDate());
        return kikuRelationshipMapper.insertKikuRelationship(kikuRelationship);
    }

    /**
     * 修改关系中心
     * 
     * @param kikuRelationship 关系中心
     * @return 结果
     */
    @Override
    public int updateKikuRelationship(KikuRelationship kikuRelationship)
    {
        kikuRelationship.setUpdateTime(DateUtils.getNowDate());
        return kikuRelationshipMapper.updateKikuRelationship(kikuRelationship);
    }

    /**
     * 批量删除关系中心
     * 
     * @param ids 需要删除的关系中心主键
     * @return 结果
     */
    @Override
    public int deleteKikuRelationshipByIds(Long[] ids)
    {
        return kikuRelationshipMapper.deleteKikuRelationshipByIds(ids);
    }

    /**
     * 删除关系中心信息
     * 
     * @param id 关系中心主键
     * @return 结果
     */
    @Override
    public int deleteKikuRelationshipById(Long id)
    {
        return kikuRelationshipMapper.deleteKikuRelationshipById(id);
    }
}
